home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2005 Utilities / CHIP Utilities 2005.7z / CHIP Utilities 2005.iso / CHIP Utilities / Zarzadzanie i bezpieczenstwo systemu / MBSA / MBSASetup-EN.msi / Data.Cab / reportdetailsHFSQL.xsl < prev    next >
Extensible Markup Language  |  2004-08-13  |  6KB  |  147 lines

  1. <?xml version="1.0"?> 
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.     
  4.     <xsl:variable name="CheckID" select="'CheckIDHere'"></xsl:variable>
  5.     <xsl:variable name="InstanceName" select="'InstanceNameHere'"></xsl:variable>
  6.  
  7.     <xsl:variable name="ScoreLookup">
  8.       <c score="0" url="Graphics/dash.gif" alttext="Check Not Performed"/>
  9.       <c score="1" url="Graphics/excl_red.gif" alttext="Unable to scan"/>
  10.       <c score="2" url="Graphics/x_red.gif" alttext="Missing security update"/>
  11.       <c score="3" url="Graphics/x_gold.gif" alttext="Warning"/>
  12.       <c score="4" url="Graphics/astrx.gif" alttext="Note message"/>
  13.       <c score="5" url="Graphics/chek_grn.gif" alttext="Check passed"/>
  14.       <c score="7" url="Graphics/info.gif" alttext="Additional information"/>
  15.     </xsl:variable>
  16.     
  17.     <xsl:template match="SecScan">
  18.         <xsl:for-each select="Check[@ID=$CheckID and @Instance=$InstanceName]">
  19.             <h1><xsl:value-of select="Advice"/></h1>
  20.             <h2>Result Details<br /><br /><xsl:value-of select="Detail/@text"/></h2>
  21.             <table id="TableID" width="100%" border="0" cellpadding="0" cellspacing="0" style="border: solid 0px #000000; padding-left: 10px; padding-right: 10px;">
  22.             <tr><td>
  23.             <xsl:choose>
  24.                     <xsl:when test="Detail/Row[@Grade='2']">
  25.                     <span>Security updates confirmed as missing are marked with a red X</span><br />
  26.                     <table cellpadding="0" cellspacing="0" style="border: solid 1px #000000">
  27.                     <tr class="DetailHeader">
  28.                         <td class="ReportListHeader" style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  29.                         <xsl:for-each select="Detail/Head/Col">
  30.                             <td nowrap="nowrap">
  31.                                 <xsl:value-of select="."/> 
  32.                             </td>
  33.                         </xsl:for-each>
  34.                     </tr>
  35.                     <xsl:for-each select="Detail/Row[@Grade='2']">
  36.                     <tr>
  37.                         <td valign="top" align="center">
  38.                             <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=2]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=2]/@url}" />        
  39.                         </td>
  40.                         <xsl:for-each select="Col">
  41.                             <xsl:choose>
  42.                                 <xsl:when test="@URL and @URL != '' and @URL != ' '">
  43.                                 <td valign="top" style="padding-right:5px;" Nowrap="true">
  44.                                 <A target="_blank" href="{@URL}"><xsl:value-of select="."/></A>
  45.                                 </td>
  46.                                 </xsl:when>
  47.                                 <xsl:otherwise>
  48.                                 <td valign="top" style="padding-right:5px;">
  49.                                 <xsl:value-of select="."/>
  50.                                 </td>
  51.                                 </xsl:otherwise>
  52.                             </xsl:choose>    
  53.                         </xsl:for-each>
  54.                     </tr>
  55.                     </xsl:for-each>
  56.                     </table>
  57.                     <br />
  58.                     </xsl:when>
  59.                 </xsl:choose>
  60.                     
  61.                 <xsl:choose>
  62.                     <xsl:when test="Detail/Row[@Grade='3']">
  63.                     <span>Products using a service pack not at the latest version or other warnings are marked with a yellow X</span><br />
  64.                     <table cellpadding="0" cellspacing="0" style="border: solid 1px #000000">
  65.                     <tr class="DetailHeader">
  66.                         <td class="ReportListHeader" style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  67.                         <xsl:for-each select="Detail/Head/Col">
  68.                             <td nowrap="nowrap">
  69.                                 <xsl:value-of select="."/> 
  70.                             </td>
  71.                         </xsl:for-each>
  72.                     </tr>
  73.                     <xsl:for-each select="Detail/Row[@Grade='3']">
  74.                     <tr>
  75.                         <td valign="top" align="center">
  76.                             <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=3]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=3]/@url}" />        
  77.                         </td>
  78.                         <xsl:for-each select="Col">
  79.                                 <xsl:choose>
  80.                                 <xsl:when test="@URL and @URL != '' and @URL != ' '">
  81.                                 <td valign="top" style="padding-right:5px;" Nowrap="true">
  82.                                 <A target="_blank" href="{@URL}"><xsl:value-of select="."/></A>
  83.                                 </td>
  84.                                 </xsl:when>
  85.                                 <xsl:otherwise>
  86.                                 <td valign="top" style="padding-right:5px;">
  87.                                 <xsl:value-of select="."/>
  88.                                 </td>
  89.                                 </xsl:otherwise>
  90.                             </xsl:choose>    
  91.                         </xsl:for-each>
  92.                     </tr>
  93.                     </xsl:for-each>
  94.                     </table>
  95.                     <br />
  96.                     </xsl:when>
  97.                 </xsl:choose>
  98.                 
  99.                 <xsl:choose>
  100.                     <xsl:when test="Detail/Row[@Grade='4']">
  101.                     <span>Security updates that the tool cannot confirm as installed on the scanned computer are marked with a blue asterisk</span><br />
  102.                     <table cellpadding="0" cellspacing="0" style="border: solid 1px #000000">
  103.                     <tr class="DetailHeader">
  104.                         <td class="ReportListHeader" style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  105.                         <xsl:for-each select="Detail/Head/Col">
  106.                             <td nowrap="nowrap">
  107.                                 <xsl:value-of select="."/> 
  108.                             </td>
  109.                         </xsl:for-each>
  110.                     </tr>
  111.                     <xsl:for-each select="Detail/Row[@Grade='4']">
  112.                     <tr>
  113.                         <td valign="top" align="center">
  114.                             <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@url}" />        
  115.                         </td>
  116.                         <xsl:for-each select="Col">
  117.                                 <xsl:choose>
  118.                                 <xsl:when test="@URL and @URL != '' and @URL != ' '">
  119.                                 <td valign="top" style="padding-right:5px;" Nowrap="true">
  120.                                 <A target="_blank" href="{@URL}"><xsl:value-of select="."/></A>
  121.                                 </td>
  122.                                 </xsl:when>
  123.                                 <xsl:otherwise>
  124.                                 <td valign="top" style="padding-right:5px;">
  125.                                 <xsl:value-of select="."/>
  126.                                 </td>
  127.                                 </xsl:otherwise>
  128.                             </xsl:choose>    
  129.                         </xsl:for-each>
  130.                     </tr>
  131.                     </xsl:for-each>
  132.                     </table>
  133.                     <br />
  134.                     </xsl:when>
  135.                 </xsl:choose>
  136.                     
  137.             </td></tr>
  138.             </table>
  139.  
  140.             If a service pack is listed, it is recommended that you install it prior to any other items listed.
  141.  
  142.         </xsl:for-each>
  143.     </xsl:template>
  144.  
  145.         
  146. </xsl:stylesheet>
  147.